<!DOCTYPE html>
<html lang="UTF-8" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head th:fragment="common-head(title)">
    <title th:replace="${title}"></title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" th:href="@{/static/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/static/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/static/css/main.css}">
    <script type="text/javascript" th:src="@{/static/jquery/jquery-2.1.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/jquery/jquery-form.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/bootstrap/js/bootstrap.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/script/docs.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/layer/layer.js}"></script>
    <link rel="stylesheet" th:href="@{/static/ztree/zTreeStyle.css}"/>
    <script type="text/javascript" th:src="@{/static/ztree/jquery.ztree.all-3.5.min.js}"></script>
    <script type="text/javascript" th:src="@{/static/crowd/common-menu.js}"></script>
    <script type="text/javascript">
        $(function () {
            $(".list-group-item").click(function(){
                if ( $(this).find("ul") ) {
                    $(this).toggleClass("tree-closed");
                    if ( $(this).hasClass("tree-closed") ) {
                        $("ul", this).hide("fast");
                    } else {
                        $("ul", this).show("fast");
                    }
                }
            });
            common_generateTree()
        });
    </script>

    <style>
        .tree li {
            list-style-type: none;
            cursor:pointer;
        }
        .tree-closed {
            height : 40px;
        }
        .tree-expanded {
            height : auto;
        }
    </style>
</head>
<body>

    <nav th:fragment="common-nav" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <div><a class="navbar-brand" style="font-size:32px;" href="#">众筹平台 - 控制面板</a></div>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li style="padding-top:8px;">
                        <div class="btn-group">
                            <button type="button" class="btn btn-default btn-success dropdown-toggle" data-toggle="dropdown">
                                <i class="glyphicon glyphicon-user"></i>
<!--                                [[${session.loginAdmin != null ? session.loginAdmin.userName:''}]] -->
                                [[${session.SPRING_SECURITY_CONTEXT.authentication.principal.username}]]
<!--                                <div sec:authentication=""></div>-->
                                <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="#"><i class="glyphicon glyphicon-cog"></i> 个人设置</a></li>
                                <li><a href="#"><i class="glyphicon glyphicon-comment"></i> 消息</a></li>
                                <li class="divider"></li>
                                <li><a th:href="@{/security/do/logout.html}"><i class="glyphicon glyphicon-off"></i> 退出系统</a></li>
                            </ul>
                        </div>
                    </li>
                    <li style="margin-left:10px;padding-top:8px;">
                        <button type="button" class="btn btn-default btn-danger">
                            <span class="glyphicon glyphicon-question-sign"></span> 帮助
                        </button>
                    </li>
                </ul>
                <form class="navbar-form navbar-right">
                    <input type="text" class="form-control" placeholder="查询">
                </form>
            </div>
        </div>
    </nav>


        <div th:fragment="common-sidebar" id="common_treeDemo" class="col-sm-3 col-md-2 ztree sidebar">

        </div>



    <p th:fragment="common">
        sidebar
    </p>
</body>
</html>